package com.xiaoke.service;

import com.xiaoke.entity.Collect;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
public interface CollectService {

    @GetMapping("/collect/findByUserAndGoods")
    Collect findByUserAndGoods(@RequestParam("userId") String userId, @RequestParam("goodsId") String goodsId);

    @GetMapping("/collect/delete")
    void delete(@RequestParam("id") String id);

    @PostMapping("/collect/insert")
    void insert(@RequestBody Collect collect);

    @GetMapping("/collect/findByUser")
    List<Map<String,Object>> findByUser(@RequestParam("userId") String userId);
}
